General Sarath Fonseka may have violated the official secrets act by accusing Sri Lankan Defence Secretary of ordering the killing of surrendering Liberation Tigers of Tamil Eelam leaders, a presidential legal adviser has said.